﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="List.aspx.cs" Inherits="pages_admin_reservation_List" MasterPageFile="~/template/template.master"%>


<%@ Register Namespace="UTS.Controls" TagPrefix="uts" %>

<asp:Content ContentPlaceHolderID="MainContent" runat="server">

<asp:UpdatePanel ID="ReservationListingPanel" runat="server" UpdateMode="Always">
<ContentTemplate>
        <uts:SemesterDropDownList ID="SemesterListDropDown" runat="server" DataTextField="SemesterName" DataValueField="SemesterId" />

        <asp:GridView ID="ReservationGridView" runat="server" 
                AutoGenerateColumns="false"
                CssClass="gridview"
                onrowcreated="ReservationGridView_RowCreated" > 
                
            <Columns>
                <asp:TemplateField HeaderText="Cohort">
                    <ItemTemplate>
                        <asp:Literal ID="Cohort" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Module">
                    <ItemTemplate>
                        <asp:Literal ID="Module" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>        
                <asp:TemplateField HeaderText="Module Events">
                    <ItemTemplate>
                        <asp:Literal ID="ModuleEventInfo" runat="server" />                            
                    </ItemTemplate>
                </asp:TemplateField>                        
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:LinkButton ID="Edit" runat="server" OnClick="ReservationEdit" Text="Edit" CommandArgument='<%# Eval("ReservationViewId") %>' />
                    </ItemTemplate>
                </asp:TemplateField>                                        
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:LinkButton ID="Delete" runat="server" OnClick="ReservationDelete" Text="Delete" CommandArgument='<%# Eval("ReservationViewId") %>' />
                    </ItemTemplate>
                </asp:TemplateField>                                                        
            </Columns>
        </asp:GridView>

        <asp:LinkButton ID="New" runat="server" OnClick="ReservationNew" Text="New" />
</ContentTemplate>
</asp:UpdatePanel>        
</asp:Content>